<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8"/>
<title>SK | Login Options - Login Form 4</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta content="width=device-width, initial-scale=1.0" name="viewport"/>
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<meta content="" name="description"/>
<meta content="" name="author"/>
<!-- BEGIN GLOBAL MANDATORY STYLES -->
<link href="http://fonts.googleapis.com/css?family=Open+Sans:400,300,600,700&subset=all" rel="stylesheet" type="text/css"/>
<link href="__PUBLIC__/Home/assets/global/plugins/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css"/>
<link href="__PUBLIC__/Home/assets/global/plugins/simple-line-icons/simple-line-icons.min.css" rel="stylesheet" type="text/css"/>
<link href="__PUBLIC__/Home/assets/global/plugins/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css"/>
<link href="__PUBLIC__/Home/assets/global/plugins/uniform/css/uniform.default.css" rel="stylesheet" type="text/css"/>
<!-- END GLOBAL MANDATORY STYLES -->
<!-- BEGIN PAGE LEVEL STYLES -->
<link href="__PUBLIC__/Home/assets/global/plugins/select2/select2.css" rel="stylesheet" type="text/css"/>
<link href="__PUBLIC__/Home/assets/admin/pages/css/login-soft.css" rel="stylesheet" type="text/css"/>
<!-- END PAGE LEVEL SCRIPTS -->
<!-- BEGIN THEME STYLES -->
<link href="__PUBLIC__/Home/assets/global/css/components.css" id="style_components" rel="stylesheet" type="text/css"/>
<link href="__PUBLIC__/Home/assets/global/css/plugins.css" rel="stylesheet" type="text/css"/>
<link href="__PUBLIC__/Home/assets/admin/layout/css/layout.css" rel="stylesheet" type="text/css"/>
<link id="style_color" href="__PUBLIC__/Home/assets/admin/layout/css/themes/darkblue.css" rel="stylesheet" type="text/css"/>
<link href="__PUBLIC__/Home/assets/admin/layout/css/custom.css" rel="stylesheet" type="text/css"/>

<!-- END THEME STYLES -->
<link rel="shortcut icon" href="favicon.ico"/>
</head>
<!-- END HEAD -->
<!-- BEGIN BODY -->
<body class="login">
<!-- BEGIN LOGO -->
<div class="logo">
	<a href="index.html">
	<img src="__PUBLIC__/Home/assets/admin/layout/img/logo.png" width="300px" height="100px" alt=""/>
	</a>
</div>
<!-- END LOGO -->
<!-- BEGIN SIDEBAR TOGGLER BUTTON -->
<div class="menu-toggler sidebar-toggler">
</div>
<!-- END SIDEBAR TOGGLER BUTTON -->
<!-- BEGIN LOGIN -->

<div class="content container">
	<!-- BEGIN LOGIN FORM -->
	<form class="login-form" action="index.html" method="post">
		<h3 class="form-title">注册账户</h3>
		<div class="alert alert-danger display-hide">
			<button class="close" data-close="alert"></button>
			<span>
			输入任何用户名和密码。 </span>
		</div>
		


				<div class="form-group">
									<div class="control-label col-md-4 ui-sortable"><label>用户名 :</label></div>
									<div class="col-md-8 ui-sortable" style="padding:14px;">
										<input class="form-control parsley-validated" id="uname" data-required="true" data-type="dateIso" placeholder="" type="text" name="uname">
									</div>
								</div>
                                <div class="form-group">
									<div class="control-label col-md-4 ui-sortable"><label>登录密码 :</label></div>
									<div class="col-md-8 ui-sortable" style="padding:14px;">
                                       <input class="form-control parsley-validated" id="pwd" data-required="true" data-type="dateIso" placeholder="" type="password" name="pwd">
									</div>
								</div>
                                <div class="form-group">
									<div class="control-label col-md-4 ui-sortable"><label>确认登录密码 :</label></div>
									<div class="col-md-8 ui-sortable" style="padding:14px;">
                                       <input class="form-control parsley-validated" id="twopwd" data-required="true" data-type="dateIso" placeholder="" type="password" name="twopwd">
									</div>
								</div>
                               <!--  <div class="form-group">
									<div class="control-label col-md-4 ui-sortable"><label>二级密码 :</label></div>
									<div class="col-md-8 ui-sortable" style="padding:14px;">
                                       <input class="form-control parsley-validated" id="topwd" data-required="true" data-type="dateIso" placeholder="" type="password" name="topwd">
									</div>
                                    
								</div>
                                <div class="form-group">
									<div class="control-label col-md-4 ui-sortable"><label>确认二级密码 :</label></div>
									<div class="col-md-8 ui-sortable" style="padding:14px;">
                                       <input class="form-control parsley-validated" id="twotopwd" data-required="true" data-type="dateIso" placeholder="" type="password" name="twotopwd">
									</div>
								</div> -->
                                <div class="form-group">
									<div class="control-label col-md-4 ui-sortable"><label>推荐人 :</label></div>
									<div class="col-md-8 ui-sortable" style="padding:14px;">
                                       <input class="form-control parsley-validated" id="tuijianid" data-required="true" data-type="dateIso" placeholder="" type="text" name="tuijianid">
									</div>
								</div>
                                <div class="form-group">
									<div class="control-label col-md-4 ui-sortable"><label>接点人 :</label></div>
									<div class="col-md-8 ui-sortable" style="padding:14px;">
                                       <input class="form-control parsley-validated" id="jiedianid" data-required="true" data-type="dateIso" placeholder="" type="text" name="jiedianid">
									</div>
								</div>
                                <div class="form-group">
									<div class="control-label col-md-4 ui-sortable"><label>分支 :</label></div>
									<div class="col-md-8 ui-sortable" style="padding:14px;">
										<input type="radio"  name="quyu" id="quyu" value="left" />左区
										<input type="radio"  name="quyu" id="quyu2" value="righ" />右区
									</div>
								</div>
                                <div class="form-group clear">
									<div class="control-label col-md-4 ui-sortable"><label>姓名 :</label></div>
									<div class="col-md-8 ui-sortable" style="padding:14px;">
                                       <input class="form-control parsley-validated" id="fullname" data-required="true" data-type="dateIso" placeholder="" type="text" name="fullname"  >
									</div>
								</div>
                                <div class="form-group">
									<div class="control-label col-md-4 ui-sortable"><label>身份证号 :</label></div>
									<div class="col-md-8 ui-sortable" style="padding:14px;">
                                       <input class="form-control parsley-validated" id="shenfenzheng" data-required="true" data-type="dateIso" placeholder="" type="text" name="shenfenzheng" >
									</div>
								</div>
                                <div class="form-group">
									<div class="control-label col-md-4 ui-sortable"><label>性别 :</label></div>
									<div class="col-md-8 ui-sortable" style="padding:14px;">
										<input type="radio" name="sex" id="sex" value="1" />男
										<input type="radio" name="sex" id="sex2" value="2" />女
									</div>
								</div>
                                
                                <div class="form-group clear">
									<div class="control-label col-md-4 ui-sortable"><label>手机号 :</label></div>
									<div class="col-md-8 ui-sortable" style="padding:14px;">
                                       <input class="form-control parsley-validated" id="tel" data-required="true" data-type="dateIso" placeholder="" type="text" name="tel">
									</div>
								</div>
								 <div class="form-group clear">
									<div class="control-label col-md-4 ui-sortable"><label>验证码 :</label></div>
									<div class="col-md-8 ui-sortable" style="padding:14px;">
                                       <input class="wid" type="text" name="code" id="code" required="required" placeholder="请输入验证码"><input  onclick="sandPhone()" type="button"  value="发送验证码" />
									</div>
								</div>



		<div class="form-actions">
			<label class="checkbox">
			<!-- <input type="checkbox" name="remember" value="1"/> 记住我 </label> -->
			 <input type="button" style=" border-radius: 4px !important; width: 25%; padding:7px 40px;" onClick="sub()" class="btn btn-danger" value="提交">
		</div>
		
		


		
	</form>
	<!-- END LOGIN FORM -->
	
</div>
<script src="__PUBLIC__/Home/assets/global/plugins/jquery.min.js" type="text/javascript"></script>
<script src="__PUBLIC__/Home/assets/global/plugins/jquery-migrate.min.js" type="text/javascript"></script>
<script src="__PUBLIC__/Home/assets/global/plugins/bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
<script src="__PUBLIC__/Home/assets/global/plugins/jquery.blockui.min.js" type="text/javascript"></script>
<script src="__PUBLIC__/Home/assets/global/plugins/uniform/jquery.uniform.min.js" type="text/javascript"></script>
<script src="__PUBLIC__/Home/assets/global/plugins/jquery.cokie.min.js" type="text/javascript"></script>
<!-- END CORE PLUGINS -->
<!-- BEGIN PAGE LEVEL PLUGINS -->
<script src="__PUBLIC__/Home/assets/global/plugins/jquery-validation/js/jquery.validate.min.js" type="text/javascript"></script>
<script src="__PUBLIC__/Home/assets/global/plugins/backstretch/jquery.backstretch.min.js" type="text/javascript"></script>
<script type="text/javascript" src="__PUBLIC__/Home/assets/global/plugins/select2/select2.min.js"></script>
<!-- END PAGE LEVEL PLUGINS -->
<!-- BEGIN PAGE LEVEL SCRIPTS -->
<script src="__PUBLIC__/Home/assets/global/scripts/metronic.js" type="text/javascript"></script>
<script src="__PUBLIC__/Home/assets/admin/layout/scripts/layout.js" type="text/javascript"></script>
<script src="__PUBLIC__/Home/assets/admin/layout/scripts/demo.js" type="text/javascript"></script>
<script src="__PUBLIC__/Home/assets/admin/pages/scripts/login-soft.js" type="text/javascript"></script>
<script src="__PUBLIC__/js/layer/layer.js" type="text/javascript"></script>
<!-- END PAGE LEVEL SCRIPTS -->
<script>
	//验证码
	function sandPhone(){
		var phone = $('#tel').val();
		if(phone==""){
			layer.msg("请输入手机号", {
			 		time: 1500, 
				});	
		}
		var url = "{:U('Reg/sendPhone')}";
		$.post(url,{'phone':phone},function(data){
			layer.msg(data.info, {
			 		time: 1500, 
				});
	 	});
	}
	function sub(){
			var url="{:U('Reg/add')}";
			var quyu = $('input[name="quyu"]:checked').val();
			var sex = $('input[name="sex"]:checked').val();
			var uname = $("#uname").val();
			var pwd = $("#pwd").val();
			var twopwd = $("#twopwd").val();
			// var topwd = $("#topwd").val();
			// var twotopwd = $("#twotopwd").val();
			var tuijianid = $("#tuijianid").val();
			var jiedianid = $("#jiedianid").val();
			var fullname = $("#fullname").val();
			var shenfenzheng = $("#shenfenzheng").val();
			var tel = $("#tel").val();
			var code = $("#code").val();
			if(pwd==""||uname==""||pwd==""||twopwd==""||tuijianid==""||jiedianid==""||fullname==""||shenfenzheng==""||tel==""||code==""){
				layer.msg("请补全信息", {
			 		time: 1500, 
				});	
				return;
			}
			if(quyu==null){
				layer.msg("请选择分支", {
			 		time: 1500, 
				});	
				return;
			}
			if(sex==null){
				layer.msg("请选择性别", {
			 		time: 1500, 
				});	
				return;
			}
			if(code==""){
				layer.msg("请输入验证码", {
			 		time: 1500, 
				});
				return;
			}
			$.post(url,{'uname':uname,'pwd':pwd,'twopwd':twopwd,'tuijianid':tuijianid,'jiedianid':jiedianid,'fullname':fullname,'shenfenzheng':shenfenzheng,'tel':tel,'code':code,'quyu':quyu,'sex':sex},function(data){
				if(data.status<0){
					layer.msg(data.info);		
				}else{
					layer.msg(data.info);
					setTimeout(function () { 
				        window.location.href=""
				    }, 2000);
					
				}
			
			});	
		}


</script>
<!-- END JAVASCRIPTS -->
</body>
<!-- END BODY -->
</html>